package com.epam.my.Pages;

import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;

public abstract class InternalPage extends AnyPage {	
	@FindBy(css = "a.r-topline__link")
	public WebElement toplineMenuUserProfile;
	@FindBy(css = "a.r-topline__underuser-item")
	public WebElement logOutButton;

	public void logOut() {		
		toplineMenuUserProfile.click();
		logOutButton.click();
	}	
	
	@Override
	public void tryToOpen() {
		MyPageFactory.getPage(driver, LoginPage.class).loginWithValidCredentials("n.adin", "@rambler.ru", "styd");;		
	}
}
